<ion-header>
  <ion-toolbar>
    <ion-title>{{ title }}</ion-title>
    <ion-buttons slot="end">
      <ion-button (click)="dismiss()">
        <ion-icon slot="icon-only" name="close"></ion-icon>
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content class="ion-padding">
  <form
    [formGroup]="formGroup"
    (ngSubmit)="handleClick(submitBtn.handler)"
    novalidate
  >
    <form-object [objectSpec]="spec" [formGroup]="formGroup"></form-object>
    <button hidden type="submit"></button>
  </form>
</ion-content>

<ion-footer>
  <ion-toolbar class="footer">
    <ion-buttons slot="end">
      <ion-button
        class="ion-padding-end"
        *ngFor="let button of buttons"
        (click)="handleClick(button.handler)"
      >
        {{ button.text }}
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-footer>
